home *** CD-ROM | disk | FTP | other *** search
/ The Best of MacTutor - S…e Code for Volumes 1 to 5 / The Best of MacTutor - Source Code for Volume 1-5 (Wayzata Technology)(6031)(1990).bin / Source Code / #21 (Jun 87) / Corrected format Source Files / FormatEqu.a < prev    next >
Text File  |  1987-06-01  |  3KB  |  88 lines

  1. ;***************** File FormatEqu.a ****************************
  2. ;***************************************************************
  3. ;
  4. ; A list of equates used in the SCSI formatting program.
  5.  
  6. ; Menu Bar resource numbers
  7.  
  8. AppleM        EQU        128
  9. FileM        EQU        129
  10. EditM        EQU        130
  11. SCSIM        EQU        131
  12.  
  13. ; Dialog box resource numbers
  14. AboutRN        EQU        128
  15. SelAddrRN    EQU        129
  16. ParamRN        EQU        130
  17. EDefectsRN    EQU        131
  18. AboutItem        EQU        1
  19.  
  20. DialWLen    EQU        170            ;lenght of window storage for
  21.                                     ;dialog box
  22.  
  23. ; Event Processing Equates
  24.  
  25. AllEvents    EQU        $0000FFFF
  26. EventMask    EQU        $FFFF
  27.  
  28. ; Codes used in error dialog box for SCSI Manager traps.
  29. Reset         EQU        $A0
  30. Get             EQU        $A1
  31. Select         EQU        $A2
  32. Command         EQU        $A3
  33. Complete    EQU        $A4
  34. Read         EQU        $A5
  35. Write         EQU        $A6
  36. Install         EQU        $A7
  37. Stat         EQU        $A10
  38.  
  39. ; Codes used in error dialog box for SCSI commands.
  40. RezeroUnit    EQU        1
  41. TestUReady    EQU        0
  42. FormatUnit    EQU        4
  43. ModeSelect    EQU        $15
  44.  
  45. MaxTicks    EQU        108000        ;max number of ticks to wait for
  46.                                     ;a SCSI command to complete
  47. MaxAddr        EQU        6            ;largest SCSI address
  48. MaxCylind    EQU        2048        ;largest number of cylinders 
  49. MaxHeads    EQU        16            ;largest number of heads 
  50. MaxBFI        EQU        $10000000    ;bigest Bytes From Index value
  51.  
  52. ; Offsets for input buffer used when inputting disk surface 
  53. ; defect information (relative to the beginning of that record).
  54. CylBBuff    EQU    0            ;offset for cylinder field
  55. HeadBBuff    EQU    4            ;offset for head field
  56. BFIBBuff    EQU    8            ;offset for bytes from index field
  57.  
  58. ; Offset for each record in output buffer (relative
  59. ; to the beginning of that record).
  60. CylOut_LB    EQU        2            ;Offset for cylinder low byte
  61. CylOut_MB    EQU        1            ;Offset for cylinder middle byte
  62. CylOut_HB    EQU        0            ;Offset for cylinder high byte
  63. HeadOut        EQU        3            ;Offset for head 
  64. BFIOut        EQU        4            ;Offset for byte from index
  65.  
  66. ; Equates for buffer sizes.  Note there are two buffers for 
  67. ; defects, one for input, and another reformated one for output
  68. ; during the Format Unit command.
  69. MaxBBs        EQU     60            ;Maximum number of defects
  70. BadBRecLen    EQU        16            ;size of each defect record for
  71.                                     ;input buffer
  72. MaxBBListLen    EQU    MaxBBs*BadBRecLen    ;length of defect buffer
  73.                                             ;for input
  74. MaxBBOutLen    EQU        (MaxBBs*8)+4    ;length of defect buffer for
  75.                                         ;output during Format
  76.                                         ;Unit command
  77.  
  78. ModeSelBytesOut        EQU    22        ;bytes transfered in Mode Select
  79.                                     ;command
  80.  
  81. ParamBuffLen    EQU        30        ;length of SCSI command
  82.                                     ;.parameter buffer
  83. CBuffLen        EQU        10        ;length of command buffer
  84. StrBuffLen        EQU        256        ;length of string buffers
  85. CommLenS        EQU        6        ;lenght of class 0 commands
  86. CommLenL        EQU        10        ;length of class 1 commands
  87. PProgLen        EQU        30        ;Pseudo program buffer length
  88.